<!DOCTYPE html>
<html>
	<head>  
	    <meta charset="UTF-8">  
	    <title>Login</title>  
	    <link rel="stylesheet" type="text/css" href="css/Login.css"/>  
		<script type="text/javascript" src="js/vue.js"></script>
		<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="js/ajax.js"></script>
	</head>  
	<body>  
	    <div id="login">  
	        <h1>Login</h1>  
	         
	            <input type="text" required="required" placeholder="账号" v-model="phone"></input>  
	            <input type="password" required="required"  placeholder="密码" v-model="password"></input>  
	            <button class="but" type="submit" v-on:click="login">登录</button>  
	         
	    </div>  
	</body> 
	<script type="text/javascript">
		var vue=new Vue({
			el:"#login",
			data:{
				phone:'',
				password:'',
			},
			methods:{
				login:function(){
					
					var url='http://localhost:8080/attendance-service/fangyahao/user';
					
					var data = {
						flag:"login",
						phone:this.phone,
						password:this.password
					}
					
					postsend(url,data,function(rs){
						if(rs.message=="success"){
							window.location.href="http://localhost:8080/attendance-service/roleShow.html"
						}
					});
				}
			}
		});
	</script>
</html>
